package com.example.demo.service.impl;

import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import com.example.demo.service.IUser;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class IUserImpl implements IUser {

    @Resource
    UserMapper userMapper;

    @Override
    public void save(User user) {
        userMapper.save(user);
    }

    @Override
    public void update(User user) {
        userMapper.updated(user);
    }

    @Override
    public List<User> list() {
        return userMapper.list();
    }

    @Override
    public void deleted(Integer id) {
        userMapper.deleted(id);
    }
}
